<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app"></div>
  <template id="my-app">
    <input type="checkbox" v-model="hobbies" value="篮球">篮球
    <input type="checkbox" v-model="hobbies" value="足球">足球
    <input type="checkbox" v-model="hobbies" value="排球">排球
    <h2>你选择的运动是:</h2>
    <ul>
      <li v-for="(item,index) in hobbies" :key="index">{{item}}</li>
    </ul>
  </template>
  <script src="../assets/js/vue.js"></script>
  <script>
    const app = Vue.createApp({
      template: '#my-app',
      data() {
        return {
          hobbies: []
        }
      },
      methods: {

      }
    })
    app.mount("#app")
  </script>
</body>

</html>